We have a number of projects where sub-projects were used instead of folders, and I'm looking for a way to determine the top-most project using DXL. I'm going to be using that value to modify some attributes within the module. I've tried using getParentProject but I can't figure out how to go further up the project chain. I know it has to be something simple. Any help would be appreciated.
|
Re: Determine top-level project for module nested in sub-project
Why not apply getParentProject recursively, e.g.:
Project getRootProject (Item I) {
Project p = getParentProject I
while (!null p && !null getParentProject item fullName p) p = getParentProject item fullName p
return p
}
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Determine top-level project for module nested in sub-project BTW, these forums provide a great resource for folks like me. Thanks again! |